package com.javase.sy06.Q1;

public class Cone implements Shape{

    double r,z, h;

    public Cone(double r, double z, double h) {
        this.r = r;
        this.z = z;
        this.h = h;
    }

    @Override
    public double area() {
        double area = PI * r * r + (PI * r * z);
        return area;
    }

    @Override
    public double volume() {
        double volume = PI * r * r * h / 3;
        return volume;
    }
}
